<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
function aaa(){//函数：自由的
    alert('abc');
}

var arr=[1,3,4,6];
arr.aaa=function(){//方法：属于一个对象
  alert('abc');
};

aaa();
arr.aaa();

    </script>
</head>
<body>

</body>
</html>